import { ActionContext } from 'vuex'
import * as $api from '@/api/system'
import * as $model from '@/api/model/systemModel'
import { IStore } from '../types'
import {
  operatorSave,
  operatorDetail,
  accountList,
  roleList,
  mediaAccountList,
  mediaAccountGetRedirectUri,
  mediaAccountMdmNameList,
  mediaAccountMediaList,
  mediaAccountBatchExport,
  operatorDelete,
  mediaAccountDelete,
  accountDelete,
  accountStatus,
  departmentList,
  departmentSave,
  departmentDelete,
  mediaAccountFailList,
  getSystemAuthority,
  getSystemRleSave,
  getSystemRleNativeSave,
  getSystemRleDelete,
  getSystemRleDetail,
  mediaAccountBatchChange
} from '@/api/system'
export type ISystemState = {}

const state = {}

const mutations = {}

const actions = {
  async operatorSave({}: ActionContext<ISystemState, IStore>, params: any) {
    return await operatorSave(params)
  },
  async operatorDelete({}: ActionContext<ISystemState, IStore>, params: any) {
    return await operatorDelete(params)
  },
  async operatorDetail({}: ActionContext<ISystemState, IStore>, params: any) {
    return await operatorDetail(params)
  },
  async accountList({}: ActionContext<ISystemState, IStore>, params: any) {
    return await accountList(params)
  },
  async roleList({}: ActionContext<ISystemState, IStore>, params: any) {
    return await roleList(params)
  },
  async getSystemAuthority({}: ActionContext<ISystemState, IStore>, params: any) {
    return await getSystemAuthority(params)
  },
  async getSystemRleDetail({}: ActionContext<ISystemState, IStore>, params: any) {
    return await getSystemRleDetail(params)
  },
  async getSystemRleSave({}: ActionContext<ISystemState, IStore>, params: any) {
    return await getSystemRleSave(params)
  },
  async getSystemRleNativeSave({}: ActionContext<ISystemState, IStore>, params: any) {
    return await getSystemRleNativeSave(params)
  },
  async getSystemRleDelete({}: ActionContext<ISystemState, IStore>, params: any) {
    return await getSystemRleDelete(params)
  },
  async mediaAccountList({}: ActionContext<ISystemState, IStore>, params: any) {
    return await mediaAccountList(params)
  },
  async mediaAccountBatchChange({}: ActionContext<ISystemState, IStore>, params: any) {
    return await mediaAccountBatchChange(params)
  },
  async mediaAccountGetRedirectUri({}: ActionContext<ISystemState, IStore>) {
    return await mediaAccountGetRedirectUri()
  },
  async mediaAccountMdmNameList({}: ActionContext<ISystemState, IStore>) {
    return await mediaAccountMdmNameList()
  },
  async mediaAccountMediaList({}: ActionContext<ISystemState, IStore>, params: any) {
    return await mediaAccountMediaList(params)
  },
  async mediaAccountBatchExport({}: ActionContext<ISystemState, IStore>, params: any) {
    return await mediaAccountBatchExport(params)
  },
  async mediaAccountDelete({}: ActionContext<ISystemState, IStore>, params: any) {
    return await mediaAccountDelete(params)
  },
  async mediaAccountFailList({}: ActionContext<ISystemState, IStore>, params: any) {
    return await mediaAccountFailList(params)
  },
  async accountDelete({}: ActionContext<ISystemState, IStore>, params: any) {
    return await accountDelete(params)
  },
  async accountStatus({}: ActionContext<ISystemState, IStore>, params: any) {
    return await accountStatus(params)
  },
  async departmentList({}: ActionContext<ISystemState, IStore>, params: any) {
    return await departmentList(params)
  },
  async departmentSave({}: ActionContext<ISystemState, IStore>, params: any) {
    return await departmentSave(params)
  },
  async departmentDelete({}: ActionContext<ISystemState, IStore>, params: any) {
    return await departmentDelete(params)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
